package cn.kent.templateMethodPattern;

/**
 * H1型号悍马,最接近军用系列
 *
 * @author kent
 * @date 2021/5/18 16:20
 */
public class HummerH1Model extends HummerModel {
    @Override
    public void start() {
        System.out.println("悍马H1发动...");
    }

    @Override
    public void stop() {
        System.out.println("悍马H1熄火停止...");
    }

    @Override
    public void alarm() {
        System.out.println("悍马H1鸣笛...");
    }

    @Override
    public void engineBoom() {
        System.out.println("悍马H1轰鸣...");
    }

    /**
     * H1特性指定，启动必响喇叭
     */
    @Override
    protected boolean isAlarm() {
//        return super.isAlarm();
        return true;
    }
}
